/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;

import Model.BD.DAO;
import Model.Classificacao;
import com.icesoft.faces.component.jsfcl.data.DefaultSelectionItems;
import java.util.List;
import javax.faces.model.SelectItem;

/**
 *
 * @author BBG
 */
public class ClassificacaoBO {

   public DAO<Classificacao> getDAO()
   {
      return new DAO<Classificacao>(Classificacao.class);
   }
   public DefaultSelectionItems montaLista(List <Classificacao> lista)
    {
        DefaultSelectionItems itens = new DefaultSelectionItems();
        itens.clear();
        int i=0;
        while(i<lista.size())
         {
            itens.add(new SelectItem(lista.get(i).getCodClassificacao(),lista.get(i).getNome()));
            i++;
         }
        return itens;
    }
}
